package com.ysp.summary.util;


import cn.hutool.core.util.RandomUtil;

import java.math.RoundingMode;

public class NumberUtil {

    public static double getDouble(){
       return RandomUtil.randomDouble(18);
    }

  public static void main(String[] args) {
        String str = "0.";
     double nu = RandomUtil.randomDouble(0.1111111111111111,0.9999999999999999,16, RoundingMode.HALF_DOWN);
    System.out.println("得到的随机数： "+nu);
    String num = String.valueOf(nu);
    System.out.println("字符串："+num);
    System.out.println("字符串长度："+num.length());
  }
}
